﻿using BasicData.Domain;
using Microsoft.EntityFrameworkCore;

namespace BasicData.Infrastrueturc
{
    /// <summary>
    /// 数据库上下文
    /// </summary>
    public class MyDbContext : DbContext
    {
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="options">上下文</param>
        public MyDbContext(DbContextOptions<MyDbContext> options) : base(options)
        {
        }
        /// <summary>
        /// 用户表
        /// </summary>
        public DbSet<User> Users { get; set; }
        /// <summary>
        /// 角色表
        /// </summary>
        public DbSet<Role> Roles { get; set; }
        /// <summary>
        /// 角色用户
        /// </summary>
        public DbSet<RoleUser> RoleUsers { get; set; }
        /// <summary>
        /// 权限
        /// </summary>
        public DbSet<Permission> Permissions { get; set; }
        /// <summary>
        /// 角色权限
        /// </summary>
        public DbSet<RolePermission> RolePermissions { get; set; }
        /// <summary>
        /// 教室
        /// </summary>
        public DbSet<Room> Rooms { get; set; }
        /// <summary>
        /// 学校
        /// </summary>
        public DbSet<School> Schools { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public DbSet<Address> Addresses { get; set; }
        /// <summary>
        /// 实例
        /// </summary>
        public DbSet<WF_Instance> WF_Instances { get; set; }
        /// <summary>
        /// 流转记录
        /// </summary>
        public DbSet<WF_Record> WF_Records { get; set; }
        /// <summary>
        /// 流程设置
        /// </summary>
        public DbSet<WF_Setting> WF_Settings { get; set; }

    }
}
